﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Remoting.Channels;
using RemotingObj;
using System.Runtime.Remoting;
using System.Threading;

namespace SvrTest {
    class Program {
        static void Main(string[] args) {
            //StartOneLiner();
            StartImageTest();

            for (int i = 0; i < 120; i++) {
                Thread.Sleep(500);
            }
        }

        public static void StartOneLiner() {
            TcpChannel channel = new TcpChannel(6947);
            ChannelServices.RegisterChannel(channel, false);
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(OneLinerRemotingObj),
                "oneliner", WellKnownObjectMode.Singleton);
        }

        public static void StartImageTest(){
            TcpChannel imageChannel = new TcpChannel(6948);
            ChannelServices.RegisterChannel(imageChannel, false);
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(ImagesRemotingObj),
                "Images", WellKnownObjectMode.Singleton);
        }
    }
}
